Kanzi  3.9.9
Kanzi Engine C++ API
kanzi::DebugRenderRegistry Class Reference

Use the debug render registry to register debug rendering functions for your custom Node3D nodes. More...

#include <kanzi/core.ui/node/debug_render_registry.hpp>

Public Types

using DebugObjectRenderingFunction = void(*)(Renderer3D &renderer, NodeSharedPtr object)
 Debug object rendering function pointer. More...
 

Public Member Functions

void addMapping (const Metaclass *metaclass, DebugObjectRenderingFunction function)
 Adds a mapping from the metaclass to the function that you want to use to render the debug visualization. More...
 
DebugObjectRenderingFunction getRenderingFunction (const Metaclass *metaclass) const
 Gets the debug rendering function of a given metaclass. More...
 

Detailed Description

Use the debug render registry to register debug rendering functions for your custom Node3D nodes.

The central registry allows the Kanzi Studio Preview and Kanzi Engine plugins to register these functions.

For your custom node type, use a debug rendering function to draw information that is helpful to you during development. For example, for the Camera node, the debug rendering function draws a wireframe visualization that displays the orientation of the camera. To see the debug visualizations in the Kanzi Studio Preview, enable the Analyze mode.

To register the debug rendering functions for your plugin module, use Module::registerDebugRenderingFunctions.

Member Typedef Documentation

Debug object rendering function pointer.

Member Function Documentation

void kanzi::DebugRenderRegistry::addMapping ( const Metaclass metaclass,
DebugObjectRenderingFunction  function 
)

Adds a mapping from the metaclass to the function that you want to use to render the debug visualization.

Parameters
metaclassMetaclass to register.
functionThe function to use to render the debug visualization for the nodes of a given metaclass.
DebugObjectRenderingFunction kanzi::DebugRenderRegistry::getRenderingFunction ( const Metaclass metaclass) const

Gets the debug rendering function of a given metaclass.

Parameters
metaclassThe Metaclass for which to get the debug rendering function.
Returns
The debug rendering function. If the metaclass has no debug rendering function, returns nullptr.

The documentation for this class was generated from the following file: